function Shape(name) {
    this.name = name;
}
Shape.prototype.logName = function () {
    console.log(`形状名称: ${this.name}`);
};
function Rectangle(name, width, height) {
    Shape.call(this, name);
    this.width = width;
    this.height = height;
}

Rectangle.prototype = Object.create(Shape.prototype);
Rectangle.prototype.constructor = Rectangle;
Rectangle.prototype.logName = function () {
    console.log(`矩形名称: ${this.name}`);
};

function Circle(name, radius) {
    Shape.call(this, name);
    this.radius = radius;
}

    Circle.prototype = Object.create(Shape.prototype);
    
    Circle.prototype.constructor = Circle;
    const rect = new Rectangle("矩形 one", 20, 40);
    const circle = new Circle("圆形one", 15);

    rect.logName();
    circle.logName();

  
    rect.logName();
    circle.logName();
